Repository navigation
Conversation
Validate variant tags before alias lookup or spelling suggestions so invalid list, mapping, numeric, and null values raise ArgumentTypeError instead of raw TypeError. AI-assisted by OpenAI Codex; submitted as a Draft for maintainer review.
for more information, see https://pre-commit.ci
📝 WalkthroughWalkthroughVariant choice handling now rejects non-string discriminator values with structured type errors, includes aliases in expected-choice suggestions, preserves alias normalization, and adds tests for invalid types, aliases, and misspelled tags. ChangesVariant choice validation
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #131 +/- ##
==========================================
+ Coverage 75.14% 75.23% +0.08%
==========================================
Files 9 9
Lines 853 856 +3
==========================================
+ Hits 641 644 +3
Misses 212 212 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
njzjz-bot
left a comment
There was a problem hiding this comment.
Reviewed the implementation, relevant tests, and CI results. No blocking correctness, security, or regression issue found.
Validation: pytest -q tests/test_checker.py (6 passed, 4 subtests); GitHub build, type-check, docs, pre-commit, and Codecov checks pass.
Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh
njzjz-bot
left a comment
There was a problem hiding this comment.
Reviewed the non-string variant-choice validation and focused checker coverage. Invalid list, mapping, numeric, and null tags now raise structured ArgumentTypeError values, while string aliases and spelling suggestions remain intact; no blocking correctness, security, regression, or test issues found.\n\nCoding agent: Codex\nCodex version: codex-cli 0.151.0\nModel: gpt-5.6-sol\nReasoning effort: xhigh
njzjz-bot
left a comment
There was a problem hiding this comment.
Reviewed the variant-choice type validation and ran the complete checker test suite from the PR head; all six tests pass, including non-string tags, aliases, and invalid choices. The new guard prevents non-string values from reaching string-only choice lookup and preserves structured ArgumentTypeError reporting. All available package, type-check, docs, Codecov, pre-commit, and CodeQL checks pass.
Coding agent: Codex
Codex version: codex-cli 0.151.0
Model: gpt-5.6-sol
Reasoning effort: xhigh
|
Three independent reviewers completed a full review of this PR. No actionable code findings were identified; non-string variant tags now produce ArgumentTypeError while aliases and suggestions remain intact. Coding agent: Codex |
Summary
ArgumentTypeErrorfor list, mapping, numeric, and null tags instead of leaking rawTypeErrorDid you meanbehavior for string valuesFixes #119.
Validation
git diff --check, Python AST checks, and a bounded manual security review passed in the publication worktreetypeguardis not installed; no dependencies were installed for this submissionAI assistance disclosure
This change was prepared and tested with OpenAI Codex. It is intentionally opened as a Draft for maintainer review. No automated issue/PR comments or Ready transition will be made.
Summary by CodeRabbit
Bug Fixes
Tests